import { useRequest } from '../../../packages/utils/useRequest'
import { useLoading } from '@components/system/Loading/useLoading'
const { show, hide } = useLoading()

const { request } = useRequest({
  baseURL: 'https://jsonplaceholder.typicode.com',
  commonHeaders: {
    Authorization: `Bearer ${localStorage.getItem('token')}`
  },
  timeout: 5000,
  loading: {
    show,
    hide
  }
})
export default request
